        
<template>
    <div>
        <el-button @click="fetchData()">重抽</el-button><el-button @click="updateMemberFlag()">确定</el-button>
        <el-table  style="width: 100%">
            <el-table-column prop="groupId" label="所属组" width="180"></el-table-column>
            <el-table-column prop="userName" label="参赛人" width="180"></el-table-column>

        </el-table>     
    
         <input v-model="entity.id" value="fsdfs">
         <input v-model="entity.nikename" value="entity.nikename">
    </div>
   
</template>
<script>
import scoreApi from '@/api/score'
import axios from "axios"

export default {
    data(){
        return {
            entity: {}
        }
    },
    created(){
        this.fetchData();
    },
    methods:{
        fetchData(){
            scoreApi.singledraw().then(response => {
                this.entity = response.data;
            });
        },
        updateMemberFlag(){
            scoreApi.updateMemberFlag(this.entity.id).then(response => {
                alert(response);
            });
        } 
    }
}
</script>